<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<h2>Users:</h2>
<div>
	<sf:form action="users" method="GET">
		<table>
			<tr>
				<td><input size="50" type="text" name="find"></td>
				<td><input type="submit" value="Search" class="submit" /></td>
			</tr>
		</table>
	</sf:form>
</div>
<div>
	<ul class="style3">
		<c:forEach var="user" items="${users}">
			<li><strong>Id: <c:out value="${user.id}" /></strong><br /> <strong>Name:
			</strong> <spring:url value="/admin/user/${user.id}" var="user_url" /> <a
				href="${user_url}"><c:out value="${user.name}" /></a><br /> <strong>Phone:
			</strong> <c:out value="${user.phone}" /><br /> <strong>Address: </strong><i><c:out
						value="${user.address}" /></i></li>
		</c:forEach>
		<c:if test="${pagination!=false}">
		  <spring:url value="/admin/users?pageNum=${prevNum}&perPage=${perPage}" var="prev_url" />
		  <a href="${prev_url}">Prev  </a>
		  <spring:url value="/admin/users?pageNum=${nextNum}&perPage=${perPage}" var="next_url" />
		  <a href="${next_url}">  Next</a>
		</c:if>
	</ul>
</div>
